<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="../layui/css/layui.css">
    <style>

    </style>
</head>
<body>
<form action="/pestSystem/area.do?method=addArea" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block">
            <input type="text" name="f_areaName" required  lay-verify="required" placeholder="请输入害虫名" autocomplete="off" class="layui-input" id="f_areaName">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">林种</label>
        <div class="layui-input-block">
            <input type="text" name="f_forestType" required  lay-verify="required" placeholder="请输入害虫宿主" autocomplete="off" class="layui-input" id="f_forestType">
        </div>
    </div>

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">优势树种</label>
        <div class="layui-input-block">
            <textarea name="f_advantageTreeType" placeholder="请输入内容" class="layui-textarea" id="f_advantageTreeType"></textarea>
        </div>
    </div>
    <!--<div class="layui-form-item">-->
        <!--<label class="layui-form-label">地类</label>-->
        <!--<div class="layui-input-block">-->
            <!--<select name="city" lay-verify="required" id="f_landType">-->
                <!--<option value="请选择地类">请选择地类</option>-->
                <!--<option value="疏林地">疏林地</option>-->
                <!--<option value="灌木林">灌木林</option>-->
                <!--<option value="苗圃地">苗圃地</option>-->
            <!--</select>-->
        <!--</div>-->
    <!--</div>-->
    <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">地类</label>
    <div class="layui-input-block">
        <textarea name="f_landType" placeholder="请输入内容" class="layui-textarea" id="f_landType"></textarea>
    </div>
</div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="submit" class="layui-btn" id="confirmBtn">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
</body>
<script src="../layui/layui.js"></script>
<script>
    //Demo
    // layui.use(['form','jquery'], function(){
    //     var form = layui.form;
    //     var $ =layui.$;
    //     //监听提交
    //     $("#confirmBtn").on("click",function () {
    //         let f_areaName =$("#f_areaName").val();
    //         let f_forestType =$("#f_forestType").val();
    //         let f_advantageTreeType =$("#f_advantageTreeType").val();
    //         let f_landType=$("#f_landType").val();
    //         $.ajax({
    //             type:"get",
    //             url:"/pestSystem/area.do?method=addArea",
    //             data:{"f_areaName":f_areaName,"f_forestType":f_forestType,"f_advantageTreeType":f_advantageTreeType,"f_landType":f_landType},
    //             success:function(data){
    //                 // console.log(data);
    //                 if(data == "true"){
    //                     layer.msg("修改成功")
    //                     table.reload("bookTable",{
    //                         page: {
    //                             curr: 1 //重新从第 1 页开始
    //                         }
    //                     });
    //                     //这里怎么跳转....
    //                 }
    //                 else{
    //                     layer.msg("修改失败")
    //                 }
    //             }
    //         });
    //
    //     });
    //
    //
    // });
</script>
</html>